Seu script, caso não funfe poste o erro.
Vá em creaturescripts/scrtipt ou creatureevents/script e crie um arquivo chamado "levelup" sem aspas e cole isso dentro:
---- Created By SmiX ----
local configuracao = {
efeito = {27,28, 29,79}, -- Efeito que vai mandar ao avançar de level.
}
function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerStorageValue(cid, 25686) >= 1 or getPlayerStorageValue(cid, 25687) >= 1 then return true end
if (getPlayerLevel(cid) == 20) then
doPlayerAddItem(cid, 15407, 1)
doPlayerAddItem(cid, 15408, 1)
doPlayerAddItem(cid, 15409, 1)
doPlayerAddItem(cid, 15710, 1)
doPlayerAddSkillTry(cid, 0, 20)
doPlayerAddSkillTry(cid, 1, 20)
doPlayerAddSkillTry(cid, 2, 20)
doPlayerAddSkillTry(cid, 3, 20)
doPlayerAddSkillTry(cid, 4, 20)
doPlayerAddSkillTry(cid, 5, 20)
doPlayerAddSkillTry(cid, 6, 20) -- Pesca Se não quiser so tirar esta linha
doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, )
setPlayerStorageValue(cid, 25686, 1)
elseif (getPlayerLevel(cid) == 30) and getPlayerVocation(cid) == 4 then -- Knight (lv 30)
doPlayerAddItem(cid, 12649, 1)
doPlayerAddSkillTry(cid, 0, 20)
doPlayerAddSkillTry(cid, 1, 20)
doPlayerAddSkillTry(cid, 2, 20)
doPlayerAddSkillTry(cid, 3, 20)
doPlayerAddSkillTry(cid, 4, 20)
doPlayerAddSkillTry(cid, 5, 20)
doPlayerAddSkillTry(cid, 6, 20) -- Pesca Se não quiser so tirar esta linha
doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, )
setPlayerStorageValue(cid, 25687, 1)
elseif (getPlayerLevel(cid) == 30) and getPlayerVocation(cid) == 3 then -- Paladin (lv 30)
doPlayerAddItem(cid, 15643, 1)
doPlayerAddItem(cid, 15648, 1)
doPlayerAddSkillTry(cid, 0, 20)
doPlayerAddSkillTry(cid, 1, 20)
doPlayerAddSkillTry(cid, 2, 20)
doPlayerAddSkillTry(cid, 3, 20)
doPlayerAddSkillTry(cid, 4, 20)
doPlayerAddSkillTry(cid, 5, 20)
doPlayerAddSkillTry(cid, 6, 20) -- Pesca Se não quiser so tirar esta linha
doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, )
setPlayerStorageValue(cid, 25687, 1)
elseif (getPlayerLevel(cid) == 30) and getPlayerVocation(cid) == 2 then -- Druid (lv 30)
doPlayerAddItem(cid, 8910, 1)
doPlayerAddManaSpent(cid, 20)
doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, )
setPlayerStorageValue(cid, 25687, 1)
elseif (getPlayerLevel(cid) == 30) and getPlayerVocation(cid) == 1 then -- Socerer (lv 30)
doPlayerAddItem(cid, 8922, 1)
doPlayerAddManaSpent(cid, 20)
doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, )
setPlayerStorageValue(cid, 25687, 1)
end
return true
end
depois de feito isso, vá em creaturescripts/scrtipt ou creatureevents/script e abra o arquivo chamado "LOGIN" e cole a teg antes do ultimo "RETURN TRUE":
registerCreatureEvent(cid, "LevelUp")
depois vá em creaturescripts.xml ou creatureevents.xml abra-ó e cole a tag abaixo:
<event type="advance" name="LevelUp" event="script" value="levelup.lua"/>





info
Grupo: Visconde
Registrado: 19/08/10
Posts: 379
Reputação: +161
Gênero: Masculino
Char no Tibia: Hexagrama
Versão do server: 9.44
Servidor utilizado: crystal server
Experiencia: scripter intermediário
Tipo do script: creaturescripts
Descrição: quando o player upar tal nivel ele vai ganhar tal item e tal skill:
Quando upar level 20 todas as vocações ganham estes itens:
15407
15408
15409
15710
e ganham +20 de skill, .20, pois nao da de upar skills no tipo do ot que eu to fazendo
knight quando upar level 30 ganha
12649 +20 de skills denovo (no caso ele vai ficar com 40 de skills)
Paladin quando upar level 30 ganha
15643
15648
+20 de skills
Sorcerer quando upar level 30 ganha
8922 +20 de skill (magic)
Druid quando upar level 30 ganha
8910 +20 de skill (magic)
Bom eu creio que seja simples, e se possivel fazer storage, tipo ele morre e upa denovo pra ganhar os itens novamente, nao quero isso, se puderem me ajudar dou REP
Editado Maio 14 por DanielZiyak